<ol class="breadcrumb">
  <li>{{t "pipes" }}</li>
  <li>{{pipe.name}}</li>
</ol>

<ul class="nav nav-tabs" role="tablist">
    {{#each navTabs}}
        <li {{#compare @index "===" 0}}class="active"{{/compare}}>
            <a href="{{this.href}}" role="tab" id="{{this.id}}-tab" data-toggle="tab" data-link="{{this.data-link}}">{{this.label}}</a>
        </li>
    {{/each}}
</ul>

<div class="tab-content">
    {{#isTabEnabled navTabs "info"}}
    <div class="tab-pane fade {{#isInitialTab navTabs "info"}}active in{{/isInitialTab}}" id="c-info">

        <p class="comment">
            <h3>{{t "file" }}</h3>
        </p>
        <p class="comment">
            <code>{{pipe.file}}</code>
        </p>

        {{#if pipe.description}}
            <p class="comment">
                <h3>{{t "description" }}</h3>
            </p>
            <p class="comment">
                {{{parseDescription pipe.description depth}}}
            </p>
        {{/if}}

        {{#if pipe.jsdoctags}}
            <p class="comment">
                <h3>{{t "example" }}</h3>
            </p>
            <div class="io-description">
                {{#jsdoc-code-example pipe.jsdoctags type='javascript'}}
                    {{#each tags}}
                        <div>
                            {{{comment}}}
                        </div>
                    {{/each}}
                {{/jsdoc-code-example}}
            </div>
        {{/if}}

        <section>
            <h3>{{t "metadata" }}</h3>
            <table class="table table-sm table-hover">
                <tbody>
                    {{#if pipe.ngname}}
                    <tr>
                        <td class="col-md-3">{{t "name"}}</td>
                        <td class="col-md-9">{{pipe.ngname}}</td>
                    </tr>
                    {{/if}}
                    {{#if pipe.pure}}
                    <tr>
                        <td class="col-md-3">{{t "pure"}}</td>
                        <td class="col-md-9">{{pipe.pure}}</td>
                    </tr>
                    {{/if}}
                </tbody>
            </table>
        </section>

        {{#if pipe.methods}}
            {{> block-method methods=pipe.methods file=pipe.file }}
        {{/if}}

        {{#if pipe.properties}}
            {{> block-property properties=pipe.properties file=pipe.file }}
        {{/if}}

    </div>
    {{/isTabEnabled}}

    {{#isTabEnabled navTabs "readme"}}
    <div class="tab-pane fade {{#isInitialTab navTabs "readme"}}active in{{/isInitialTab}}" id="c-readme">
        <p>{{{pipe.readme}}}</p>
    </div>
    {{/isTabEnabled}}

    {{#isTabEnabled navTabs "source"}}
    <div class="tab-pane fade {{#isInitialTab navTabs "source"}}active in{{/isInitialTab}} tab-source-code" id="c-source">
        <pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">{{ pipe.sourceCode}}</code></pre>
    </div>
    {{/isTabEnabled}}

    {{#isTabEnabled navTabs "example"}}
    <div class="tab-pane fade {{#isInitialTab navTabs "example"}}active in{{/isInitialTab}}" id="c-example">
        {{#each pipe.exampleUrls}}
            <iframe class="exampleContainer" src="{{this}}">
                <p>{{t "no-iframes" }}</p>
            </iframe>
        {{/each}}
    </div>
    {{/isTabEnabled}}
</div>
